package com.qf.service.impl;

import com.qf.service.CartService;
import com.qf.service.OrderDetailService;
import com.qf.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

//    @Autowired
//    private OrderMapper orderMapper;

    @Autowired
    private OrderDetailService orderDetailService;

    @Autowired
    private CartService cartService;


    @Override
    public void createOrder() {
        //1. 生成orderId

        //2. 添加数据到Order表    添加,orderMapper

        //3. 添加订单相应到OrderDetail表  添加,orderDetailService   //没有事务

        //4. 清空Cart表中的信息  删除,cartService   //  没有事务
    }
}
